<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <title>邮件退订_大街网</title>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="http://assets.dajieimg.com/lib/jquerymobile/jquery.mobile-1.4.2.min.56456.css" />
    <script src="http://assets.dajieimg.com/lib/jquerymobile/jquery-1.11.0.min.56456.js"></script>
    <script src="http://assets.dajieimg.com/lib/jquerymobile/jquery.mobile-1.4.2.min.56456.js"></script>
    <style>
      @media only screen and (min-width: 30em){
        .ui-page{
          width: 30em !important;
          margin: 0 auto !important;
          position: relative !important;
        }
        .ui-overlay-d{
          background: #333;
        }
      }
    </style>
  </head>
  <body style="font-family:'Microsoft YaHei',微软雅黑,sans-serif;">
    <div data-role="page" id="mainPage">
      <div data-role="header" style="background-color:#39404D" class="ui-grid-a">
        <div class="ui-block-a">
          <img src="http://assets.dajieimg.com/up/dj-mobile/images/logo.png" style="float:left;height:2.5em;line-height:2.5em;overflow:hidden;padding-left:1em;"/>
        </div>
        <div class="ui-block-b">
          <h4 style="color:#FFF;font-family:'Microsoft YaHei',微软雅黑,sans-serif;float:right;padding-right:1em;height:2.5em;line-height:2.5em;overflow:hidden;margin:0px;">邮件退订</h4>
        </div>
      </div>
      <div role="main" class="ui-content">
        <ul data-role="listview" id="mainUL">
          <li style="padding-top:0px;padding-bottom:0px;" id="titleLi">
            <span class="ui-btn ui-icon-check ui-btn-icon-top" style="font-family:'Microsoft YaHei',微软雅黑,sans-serif;background-color:#FFF;border-style:none;" id="succ">该类型邮件退订成功！</span>
            <span class="ui-btn ui-icon-check ui-btn-icon-top" style="font-family:'Microsoft YaHei',微软雅黑,sans-serif;background-color:#FFF;border-style:none;display:none;" id="saveSucc">保存成功！</span>
            <span class="ui-btn ui-icon-check ui-btn-icon-top" style="font-family:'Microsoft YaHei',微软雅黑,sans-serif;background-color:#FFF;border-style:none;display:none;" id="saveError">保存失败！点击&nbsp;<a style="cursor:pointer;" id="returnEdit">返回</a>&nbsp;重试</span>
          </li>
          <li style="padding-top:10px;text-align:center;" id="subTitleLi">
            <span style="font-family:'Microsoft YaHei',微软雅黑,sans-serif;background-color:#FFF;border-style:none;white-space:normal;">筛选下面的职位条件，我们会帮您更好地挑选职位！</span>
          </li>
          <li style="padding-top:0px;padding-bottom:0px;border-style:none;" id="industryLi">
            <div class="ui-field-contain">
              <fieldset data-role="controlgroup">
                <legend>所在行业&nbsp;</legend>
                  <label for="industry"></label>
                  <select name="industry" id="industry">
                    <option value="0" selected="selected">请选择</option>
                    <option value="1">IT行业</option>
                    <option value="2">金融行业</option>
                    <option value="3">专业服务</option>
                    <option value="4">教育培训行业</option>
                    <option value="5">消费品行业</option>
                    <option value="6">文化传媒行业</option>
                    <option value="7">建筑/房地产行业</option>
                    <option value="8">贸易物流行业</option>
                    <option value="9">制造工业</option>
                    <option value="10">医疗/卫生</option>
                    <option value="11">服务业</option>
                    <option value="12">其他</option>
                  </select>
                  <label for="subindustry"></label>
                  <select name="subindustry" id="subindustry">
                    <option value="0" selected="selected">请选择</option>
                  </select>
              </fieldset>
            </div>
          </li>
          <li style="padding-top:0px;padding-bottom:0px;border-style:none;" id="jobNameLi">
            <div class="ui-field-contain" style="margin:0px;">
              <div class="ui-field-contain">
                <label for="jobName">职位名称&nbsp;<span style="color:red;">*</span></label>
                <input name="jobName" id="jobName" placeholder="输入职位名称" value="" type="text">
              </div>
            </div>
          </li>
          <li style="padding-top:0px;padding-bottom:0px;border-style:none;" id="placeLi">
            <div class="ui-field-contain">
              <fieldset data-role="controlgroup">
                <legend>所在地&nbsp;<span style="color:red;">*</span></legend>
                  <label for="province">选择省份</label>
                  <select name="province" id="province">
                    <option value="0" selected="selected">选择省份</option>
                    <option value="110000" >北京</option>
                    <option value="120000" >天津</option>
                    <option value="130000" >河北</option>
                    <option value="140000" >山西</option>
                    <option value="150000" >内蒙古</option>
                    <option value="210000" >辽宁</option>
                    <option value="220000" >吉林</option>
                    <option value="230000" >黑龙江</option>
                    <option value="310000" >上海</option>
                    <option value="320000" >江苏</option>
                    <option value="330000" >浙江</option>
                    <option value="340000" >安徽</option>
                    <option value="350000" >福建</option>
                    <option value="360000" >江西</option>
                    <option value="370000" >山东</option>
                    <option value="410000" >河南</option>
                    <option value="420000" >湖北</option>
                    <option value="430000" >湖南</option>
                    <option value="440000" >广东</option>
                    <option value="450000" >广西</option>
                    <option value="460000" >海南</option>
                    <option value="500000" >重庆</option>
                    <option value="510000" >四川</option>
                    <option value="520000" >贵州</option>
                    <option value="530000" >云南</option>
                    <option value="540000" >西藏</option>
                    <option value="610000" >陕西</option>
                    <option value="620000" >甘肃</option>
                    <option value="630000" >青海</option>
                    <option value="640000" >宁夏</option>
                    <option value="650000" >新疆</option>
                    <option value="800000" >港澳台</option>
                    <option value="810000" >海外</option>
                  </select>
                  <label for="city">选择城市</label>
                  <select name="city" id="city">
                    <option value="" selected="selected">选择城市</option>
                  </select>
              </fieldset>
            </div>
          </li>
          <li style="padding-top:0px;padding-bottom:0px;border-style:none;" id="salaryLi">
            <div class="ui-field-contain">
              <fieldset data-role="controlgroup">
                <legend>月薪范围&nbsp;<span style="color:red;">*</span></legend>
                  <label for="salary">工作年限</label>
                  <select name="salary" id="salary">
                    <option value="0">不限</option>
                    <option value="125">1000及以上</option>
                    <option value="127">2000及以上</option>
                    <option value="128">3000及以上</option>
                    <option value="129">4000及以上</option>
                    <option value="130">5000及以上</option>
                    <option value="131">6000及以上</option>
                    <option value="132">8000及以上</option>
                    <option value="133">10000及以上</option>
                    <option value="134">15000及以上</option>
                    <option value="135">20000及以上</option>
                  </select>
              </fieldset>
            </div>
          </li>
          <li id="submitLi">
            <button id="done" class="ui-btn ui-icon-check ui-btn-icon-left ui-shadow ui-corner-all" style="background-color:#ED6C10;color:#FFF;">保&nbsp;&nbsp;&nbsp;&nbsp;存</button>
          </li>
        </ul>
      </div>
      <div data-role="footer" class="ui-grid-a" style="border-style:none;background-color:#BBC0C9;font-weight:normal;">
        <div class="ui-block-a">
          <span style="color:#FFF;font-size:13px;font-family:'Microsoft YaHei',微软雅黑,sans-serif;float:left;padding-left:1em;height:2em;line-height:2em;overflow:hidden;margin:0px;">&copy;2008-2014 大街网</span>
        </div>
        <div class="ui-block-b">
        </div>
      </div>
    </div>
  </body>
  <script type="text/javascript">
    var cityJson = {"150000":{"name":"内蒙古","citys":{"152500":"锡林郭勒","150400":"赤峰","152900":"阿拉善","150800":"巴彦淖尔","150100":"呼和浩特","150500":"通辽","150900":"乌兰察布","150200":"包头","150600":"鄂尔多斯","152200":"兴安","150300":"乌海","150700":"呼伦贝尔"}},"110000":{"name":"北京","citys":{"110000":"北京"}},"420000":{"name":"湖北","citys":{"420800":"荆门","420300":"十堰","421100":"黄冈","420700":"鄂州","420900":"孝感","423100":"天门","421000":"荆州","420100":"武汉","421300":"随州","420500":"宜昌","422800":"恩施","423000":"潜江","420200":"黄石","421200":"咸宁","420600":"襄阳","422900":"仙桃"}},"460000":{"name":"海南","citys":{"469100":"文昌","460300":"五指山","460400":"琼海","469300":"东方","460500":"儋州","460100":"海口","469200":"万宁","460200":"三亚"}},"140000":{"name":"山西","citys":{"140900":"忻州","140200":"大同","140600":"朔州","140100":"太原","140800":"运城","140500":"晋城","141100":"吕梁","140400":"长治","140300":"阳泉","141000":"临汾","140700":"晋中"}},"810000":{"name":"海外","citys":{"810000":"海外"}},"230000":{"name":"黑龙江","citys":{"230200":"齐齐哈尔","230900":"七台河","230600":"大庆","232700":"大兴安岭","231000":"牡丹江","230100":"哈尔滨","230800":"佳木斯","230500":"双鸭山","232900":"加格达奇","231200":"绥化","230400":"鹤岗","230300":"鸡西","230700":"伊春","231100":"黑河"}},"360000":{"name":"江西","citys":{"360800":"吉安","360300":"萍乡","361100":"上饶","360700":"赣州","360200":"景德镇","361000":"抚州","360600":"鹰潭","360100":"南昌","360500":"新余","360900":"宜春","360400":"九江"}},"500000":{"name":"重庆","citys":{"500000":"重庆"}},"410000":{"name":"河南","citys":{"410300":"洛阳","411400":"商丘","410800":"焦作","410700":"新乡","411200":"三门峡","410200":"开封","410600":"鹤壁","411700":"驻马店","411100":"漯河","410100":"郑州","410500":"安阳","411500":"信阳","411600":"周口","411000":"许昌","410900":"濮阳","411300":"南阳","419000":"济源","410400":"平顶山"}},"800000":{"name":"港澳台","citys":{"800000":"港澳台"}},"220000":{"name":"吉林","citys":{"220400":"辽源","220800":"白城","220100":"长春","220500":"通化","220200":"吉林市","220600":"白山","222400":"延边","220300":"四平","220700":"松原"}},"520000":{"name":"贵州","citys":{"520300":"遵义","522400":"毕节","520200":"六盘水","522300":"黔西南","522700":"黔南","520100":"贵阳","522200":"铜仁","522600":"黔东南","520400":"安顺"}},"610000":{"name":"陕西","citys":{"610400":"咸阳","610700":"汉中","610300":"宝鸡","610600":"延安","610900":"安康","611000":"商洛","610200":"铜川","610500":"渭南","610100":"西安","610800":"榆林"}},"130000":{"name":"河北","citys":{"130400":"邯郸","131000":"廊坊","130500":"邢台","131100":"衡水","130800":"承德","130100":"石家庄","130600":"保定","130200":"唐山","130900":"沧州","130700":"张家口","130300":"秦皇岛"}},"440000":{"name":"广东","citys":{"441400":"梅州","440800":"湛江","440900":"茂名","440600":"佛山","445300":"云浮","441600":"河源","440100":"广州","441500":"汕尾","445200":"揭阳","440200":"韶关","441700":"阳江","445400":"顺德","441900":"东莞","441800":"清远","440700":"江门","440500":"汕头","441200":"肇庆","442000":"中山","445100":"潮州","440300":"深圳","440400":"珠海","441300":"惠州"}},"640000":{"name":"宁夏","citys":{"640100":"银川","640200":"石嘴山","640300":"吴忠","640400":"固原","640500":"中卫"}},"510000":{"name":"四川","citys":{"510800":"广元","511500":"宜宾","510300":"自贡","513400":"凉山","511100":"乐山","510700":"绵阳","510900":"遂宁","511400":"眉山","510400":"攀枝花","511900":"巴中","511000":"内江","511700":"达州","510100":"成都","511300":"南充","510500":"泸州","513200":"阿坝","511800":"雅安","511600":"广安","512000":"资阳","513300":"甘孜","510600":"德阳"}},"120000":{"name":"天津","citys":{"120000":"天津"}},"650000":{"name":"新疆","citys":{"652300":"昌吉","652800":"巴音郭楞","652700":"博尔塔拉","659400":"五家渠","652200":"哈密","659100":"石河子","653100":"喀什","659200":"阿拉尔","652100":"吐鲁番","650200":"克拉玛依","653200":"和田","659300":"图木舒克","650100":"乌鲁木齐","653000":"克孜勒苏","652900":"阿克苏","654000":"伊犁"}},"530000":{"name":"云南","citys":{"533300":"怒江","530300":"曲靖","530800":"普洱","530700":"丽江","532500":"红河","530900":"临沧","532800":"西双版纳","533100":"德宏","530400":"玉溪","532600":"文山","530100":"昆明","532900":"大理","530500":"保山","533400":"迪庆","530600":"昭通","532300":"楚雄"}},"370000":{"name":"山东","citys":{"370800":"济宁","371500":"聊城","370300":"淄博","371100":"日照","370700":"潍坊","370900":"泰安","371400":"德州","370400":"枣庄","371000":"威海","371700":"菏泽","370100":"济南","371300":"临沂","370500":"东营","371600":"滨州","370200":"青岛","371200":"莱芜","370600":"烟台"}},"330000":{"name":"浙江","citys":{"330700":"金华","330800":"衢州","330300":"温州","330400":"嘉兴","330900":"舟山","330500":"湖州","331000":"台州","330100":"杭州","330600":"绍兴","331100":"丽水","330200":"宁波"}},"210000":{"name":"辽宁","citys":{"210900":"阜新","210200":"大连","210600":"丹东","210100":"沈阳","210800":"营口","210500":"本溪","211400":"葫芦岛","211200":"铁岭","211100":"盘锦","210400":"抚顺","210300":"鞍山","211300":"朝阳","211000":"辽阳","210700":"锦州"}},"620000":{"name":"甘肃","citys":{"620600":"武威","620200":"嘉峪关","620900":"酒泉","620700":"张掖","623000":"甘南","621200":"陇南","620300":"金昌","621000":"庆阳","622900":"临夏","620400":"白银","621100":"定西","620500":"天水","620800":"平凉","620100":"兰州"}},"430000":{"name":"湖南","citys":{"430800":"张家界","430300":"湘潭","431100":"永州","433100":"湘西","430700":"常德","430200":"株洲","431000":"郴州","431200":"怀化","430600":"岳阳","430100":"长沙","430500":"邵阳","430900":"益阳","431300":"娄底","430400":"衡阳"}},"340000":{"name":"安徽","citys":{"340300":"蚌埠","341600":"亳州","340800":"安庆","340700":"铜陵","341200":"阜阳","340200":"芜湖","341800":"宣城","340600":"淮北","341100":"滁州","340100":"合肥","340500":"马鞍山","341500":"六安","341000":"黄山","341300":"宿州","341700":"池州","340400":"淮南"}},"630000":{"name":"青海","citys":{"632500":"海南州","632100":"海东","632700":"玉树","632800":"海西","632300":"黄南","632600":"果洛","630100":"西宁","632200":"海北"}},"350000":{"name":"福建","citys":{"350300":"莆田","350800":"龙岩","350700":"南平","350900":"宁德","350400":"三明","350100":"福州","350500":"泉州","350200":"厦门","350600":"漳州"}},"310000":{"name":"上海","citys":{"310000":"上海"}},"540000":{"name":"西藏","citys":{"542600":"林芝","542200":"山南","542500":"阿里","542100":"昌都","542400":"那曲","540100":"拉萨","542300":"日喀则"}},"999999":{"name":"其它","citys":{"999999":"其它"}},"320000":{"name":"江苏","citys":{"320700":"连云港","320800":"淮安","320300":"徐州","320600":"南通","320200":"无锡","320500":"苏州","320100":"南京","321200":"泰州","321000":"扬州","320400":"常州","321100":"镇江","320900":"盐城","321300":"宿迁"}},"450000":{"name":"广西","citys":{"450700":"钦州","451100":"贺州","450300":"桂林","450800":"贵港","450600":"防城港","451200":"河池","450200":"柳州","450500":"北海","451300":"来宾","450100":"南宁","451000":"百色","450400":"梧州","451400":"崇左","450900":"玉林"}}};

    var industryJson = {"11":{"name":"服务业","sub":{"82":"私人/家政服务","83":"图书馆/展览馆","80":"旅游","81":"休闲/娱乐/健身","79":"餐饮","78":"酒店"}},"10":{"name":"医疗/卫生","sub":{"77":"动物医疗","76":"医药","75":"生物技术","74":"医疗器械","73":"医疗/护理"}},"12":{"name":"其他","sub":{"88":"公共事业","89":"非营利组织","90":"政府部门","86":"农/林/牧/渔","87":"研究所/研究院","85":"环境"}},"1":{"name":"IT行业","sub":{"13":"计算机软件","15":"IT服务","14":"计算机硬件","17":"电子商务","16":"互联网","19":"通信","18":"游戏","20":"电子/半导体"}},"3":{"name":"专业服务","sub":{"25":"会计/审计","26":"人力资源","27":"管理咨询","30":"翻译","28":"法律","29":"检测/认证"}},"2":{"name":"金融行业","sub":{"24":"投资","21":"银行","22":"保险","23":"证券/基金/期货"}},"5":{"name":"消费品行业","sub":{"39":"家具/家居","38":"奢侈品/珠宝","42":"办公用品","37":"家电/数码产品","36":"服装/纺织","35":"食品/饮料","34":"日用品/化妆品","40":"酒品","41":"烟草业"}},"4":{"name":"教育培训行业","sub":{"33":"培训","32":"初中等教育","31":"高等教育"}},"7":{"name":"建筑/房地产行业","sub":{"55":"建材","54":"物业管理","56":"装修装潢","51":"建筑设计/规划","53":"房地产","52":"土木工程"}},"6":{"name":"文化传媒行业","sub":{"48":"艺术/工艺","49":"体育","46":"影视","47":"出版","44":"报纸/杂志","45":"广播","43":"广告/公关/会展","50":"动漫"}},"9":{"name":"制造工业","sub":{"71":"印刷/包装","70":"造纸","62":"化工","63":"原材料/加工","64":"新材料","65":"汽车","66":"机械/自动化","67":"军工/国防","68":"采矿/金属","69":"原油/能源","72":"航天/造船"}},"8":{"name":"贸易物流行业","sub":{"60":"物流/仓储","61":"运输/铁路/航空","57":"进出口","59":"商店/超市","58":"批发/零售"}}};

    var industryIdDict = {"1":"0","2":"0","3":"0","4":"0","5":"0","6":"0","7":"0","8":"0","9":"0","10":"0","11":"0","12":"0","13":"1","14":"1","15":"1","16":"1","17":"1","18":"1","19":"1","20":"1","21":"2","22":"2","23":"2","24":"2","25":"3","26":"3","27":"3","28":"3","29":"3","30":"3","31":"4","32":"4","33":"4","34":"5","35":"5","36":"5","37":"5","38":"5","39":"5","40":"5","41":"5","42":"5","43":"6","44":"6","45":"6","46":"6","47":"6","48":"6","49":"6","50":"6","51":"7","52":"7","53":"7","54":"7","55":"7","56":"7","57":"8","58":"8","59":"8","60":"8","61":"8","62":"9","63":"9","64":"9","65":"9","66":"9","67":"9","68":"9","69":"9","70":"9","71":"9","72":"9","73":"10","74":"10","75":"10","76":"10","77":"10","78":"11","79":"11","80":"11","81":"11","82":"11","83":"11","85":"12","86":"12","87":"12","88":"12","89":"12","90":"12"};

    $("#province").change(function(){
      var province = $(this).val();
      var res = '<option value="0" selected="selected">选择城市</option>';
      if (province != "") {
        for(var id in cityJson[province]["citys"]) {
          res += '<option value="' + id + '">' + cityJson[province]["citys"][id] + '</option>';
        }
      }
      $("#city").html(res);
      $("#city option[text='选择城市']").attr("selected", true);
      $("span", $("#city").parent()).text("选择城市");
    });

    $("#industry").change(function(){
      var industry = $(this).val();
      var res = '<option value="0" selected="selected">请选择</option>'
      if (industry != "") {
        for(var id in industryJson[industry]["sub"]) {
          res += '<option value="' + id + '">' + industryJson[industry]["sub"][id] + '</option>'
        }
      }
      $("#subindustry").html(res);
      $("#subindustry option[text='请选择']").attr("selected", true);
      $("span", $("#subindustry").parent()).text("请选择");
    });

    $("#returnEdit").click(function(){
        $("#succ").show();
        $("#subTitleLi, #industryLi, #placeLi, #salaryLi, #jobNameLi, #submitLi").show();
        $("#saveSucc, #saveError").show();
    });

    $("#done").click(function(){
        if ($("input[name=jobName]").val() == "") {
            alert("请填写职位名称");
            return;
        }
        if ($("select[name=province]").val() == "0" || $("select[name=city]").val() == "0") {
            alert("请选择省份和城市");
            return;
        }

        uid = "${uid}";
        toEmail = "${to_email}";
        var industry = $("select[name=industry]").val();
        var subIndustry = $("select[name=subIndustry]").val();
        var jobName = $("input[name=jobName]").val();
        var province = $("select[name=province]").val();
        var city = $("select[name=city]").val();
        var salary = $("select[name=salary]").val();
        var data = {'uid':uid, 'to_email':toEmail, 'industry':industry,'subIndustry':subIndustry,'jobName':jobName,'province':province,'city':city,'salary':salary}
        $.ajax({
            type: "POST",
            url: "/invitation/unsubscribe/save",
            cache: false,
            data: data,
            dataType: 'text',
            success: function(d){
                $("#succ").hide();
                $("#subTitleLi, #industryLi, #placeLi, #salaryLi, #jobNameLi, #submitLi").hide();
                if (d == "OK") {
                    $("#saveSucc").show();
                } else {
                    $("#saveError").show();
                }
            },
            error: function(d){
                $("#unsubscribeSucc").hide();
                $(".mainContent").hide()
                $("#saveSucc").hide();
                $("#saveError").hide();
            }
        });
    });

  </script>
</html>